package com.stf.base;

import android.text.TextUtils;
import android.util.Base64;

public class Base64Utils {
    //base64编码
    public static String makeUidToBase64(String uid) {
        String enUid = new String(Base64.encode(uid.getBytes(), Base64.DEFAULT));
        return enUid;
    }

    //解码
    public static String getUidFromBase64(String base64Id) {
        String result = "";
        if (!TextUtils.isEmpty(base64Id)) {
            if (!TextUtils.isEmpty(base64Id)) {
                result = new String(Base64.decode(base64Id.getBytes(), Base64.DEFAULT));
            }
        }
        return result;
    }
}
